package com.ruoyi.retirement.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.retirement.domain.RetirementArticleEnroll;
import com.ruoyi.retirement.mapper.RetirementArticleEnrollMapper;
import com.ruoyi.retirement.service.IRetirementArticleEnrollService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 文章收藏列表Service业务层处理
 * 
 * @author 曹旭
 * @date 2025-09-03
 */
@Service
public class RetirementArticleEnrollServiceImpl implements IRetirementArticleEnrollService 
{
    @Autowired
    private RetirementArticleEnrollMapper retirementArticleEnrollMapper;


    /**
     * 查询文章收藏列表列表
     * 
     * @param retirementArticleEnroll 文章收藏列表
     * @return 文章收藏列表
     */
    @Override
    public List<RetirementArticleEnroll> selectRetirementArticleEnrollList(RetirementArticleEnroll retirementArticleEnroll)
    {
        return retirementArticleEnrollMapper.selectRetirementArticleEnrollList(retirementArticleEnroll);
    }

    /**
     * 新增文章收藏列表
     * 
     * @param retirementArticleEnroll 文章收藏列表
     * @return 结果
     */
    @Override
    public int insertRetirementArticleEnroll(RetirementArticleEnroll retirementArticleEnroll)
    {
        retirementArticleEnroll.setCreateTime(DateUtils.getNowDate());
        return retirementArticleEnrollMapper.insertRetirementArticleEnroll(retirementArticleEnroll);
    }

    /**
     * 删除文章收藏列表信息
     * 
     * @param retirementArticleEnroll 文章收藏列表主键
     * @return 结果
     */
    @Override
    public int deleteRetirementArticleEnrollById(RetirementArticleEnroll retirementArticleEnroll)
    {
        return retirementArticleEnrollMapper.deleteRetirementArticleEnrollById(retirementArticleEnroll);
    }
}
